/** @file engine.h
 * The header jvm engine.
 *
 * Copyright (C) 2007 
 *   Renan Mendes Carvalho <aitherios@gmail.com>
 *   Pedro Marinho <pedro7x@gmail.com>
 *
 * This program is free software: you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program.  If not, see <http://www.gnu.org/licenses/>.
 */

/** include guard */
#ifndef _ENGINE_H
#  define _ENGINE_H

#include<stdio.h>
#include<stdlib.h>
#include<string.h>
#include"types.inc"
#include"simperr.h"

int
start_jvm_thread ();

int
stop_jvm_thread ();

void *
push_method_area (size_t size);

void *
push_heap (size_t size);

void * 
push_java (size_t size);

void * 
getsp_method_area ();

void * 
getsp_heap ();

void *
getsp_java ();

void *
getbp_java ();

void *
pop_method_area (size_t size);

void *
pop_heap (size_t size);

void * 
pop_java (size_t size);

void * 
getpc ();

void
setpc (void * p);

void
incpc (int i);

void
meminv (void * p, size_t size);

/* _ENGINE_H */
#endif
